#!/bin/bash
#test-suffix.sh


mystr="ViewConteoller.m"
if [ -n "`echo $mystr | sed -n /.*\.m\$/p`" ]
then 
	echo "matched"
else
	echo "not matched"
fi


if [[ "$mystr" =~ '.*m$' ]]; then
	echo "matched"
else
	echo "not matched"
fi


if [[ $(expr $mystr : '.*\.m') -gt 0 ]]
then 
	echo "matched"
else
	echo "not matched"
fi